package cn.jesin.chataiapplication.config;

import com.alibaba.dashscope.utils.Constants;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author 谷汉斌
 * @description
 * @createTime 2024/9/18 下午4:07
 */
@Configuration
public class MyConfig {

    @Value("${aliyunInfo.apikey}")
    private String apiKey;

    @PostConstruct
    public void config(){
        //设置APIKEY
        Constants.apiKey=apiKey;
    }
}
